<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/CampsitePeople.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from '@/extension/mall/CampsitePeople.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
console.log()
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'id',
        footer: 'Foots',
        cnName: '营员列表',
        name: 'CampsitePeople',
        url: '/CampsitePeople/',
        sortName: 'createDate',
      },
      extend: extend,
      editFormFields: {
        head_img: '',
        gender: '',
        height: '',
        name: '',
        IdCard: '',
        IdCardType: '',
        shoeSize: '',
        parentsIdCard: '',
        parentsName: '',
        parentsPhone: '',
        plateNum: '',
        skiLevel: '',
        weight: '',
        remarks: '',
        modifier: '',
        modifyDate: '',
        modifyID: '',
        createDate: '',
        createID: '',
        creator: '',
      },
      editFormOptions: [
        [
          { title: '头像', field: 'head_img', type: 'img', maxFile: 1, multiple: true, maxSize: 1,storage:'OSS_H' },
          { title: '姓名', field: 'name', type: 'text' },
          { dataKey: 'gender', data: [], title: '性别', field: 'gender', type: 'select' },
        ],
        [
          { title: '身高', field: 'height', type: 'text' },
          { dataKey: 'certificate_type', data: [], title: '证件类型', field: 'IdCardType', type: 'select' },
          { title: '证件号', field: 'IdCard', type: 'text' },
        ],
        [
          { title: '单双板', field: 'plateNum', type: 'radio', dataKey: 'plateNum', data: [] },
          //    {"title":"滑雪水平","field":"skiLevel"},
          { title: '鞋码', field: 'shoeSize' },
          { title: '体重', field: 'weight' },
        ],
        [
          { title: '监护人姓名', field: 'parentsName' },
          { title: '监护人手机', field: 'parentsPhone', type: 'phone' },
          { title: '监护人证件号', field: 'parentsIdCard' },
        ],
        [{ title: '注意事项/备注', field: 'remarks', type: 'textarea', colSize: 12 }],
      ],
      searchFormFields: { gender: '', IdCard: '', IdCardType: '', name: '', parentsName: '', parentsPhone: '' },
      searchFormOptions: [
        [
          { title: '姓名', field: 'name', type: 'like' },
          { dataKey: 'gender', data: [], title: '性别', field: 'gender', type: 'select' },
          { title: '证件号', field: 'IdCard', type: 'like' },
        ],
        [
          { dataKey: 'certificate_type', data: [], title: '证件类型', field: 'IdCardType', type: 'select' },
          { title: '监护人姓名', field: 'parentsName', type: 'like' },
          { title: '监护人手机', field: 'parentsPhone', type: 'like' },
        ],
      ],
      columns: [
        { field: 'head_img', title: '头像', type: 'img', width: 90, align: 'left' },
        { field: 'name', title: '姓名', type: 'string', width: 90, align: 'left' },
        { field: 'gender', title: '性别', type: 'int', bind: { key: 'gender', data: [] }, width: 90, align: 'left' },
        { field: 'height', title: '身高', type: 'string', width: 90, align: 'left' },
        { field: 'IdCardType', title: '证件类型', type: 'int', bind: { key: 'certificate_type', data: [] }, width: 90, align: 'left' },
        { field: 'IdCard', title: '证件号', type: 'string', width: 220, align: 'left' },
        { field: 'medalId', title: '勋章', type: 'string', width: 220, align: 'left' },
        { field: 'labelId', title: '标签', type: 'string', width: 220, align: 'left' },
        { field: 'shoeSize', title: '鞋码', type: 'string', width: 90, align: 'left' },
        //    {field:'skiLevel',title:'滑雪水平',type:'string',width:220,align:'left'},
        //    {field:'uid',title:'guid',type:'string',width:90,align:'left'},
        { field: 'weight', title: '体重', type: 'string', width: 90, align: 'left' },
        //    {field:'plateNum',title:'单双板',type:'int',width:90,align:'left'},
        { field: 'parentsName', title: '监护人姓名', type: 'string', width: 90, align: 'left' },
        { field: 'parentsPhone', title: '监护人手机', type: 'string', width: 90, align: 'left' },
        { field: 'parentsIdCard', title: '监护人证件号', type: 'string', width: 220, align: 'left' },
        // {field:'birthDate',title:'出生日期',type:'datetime',width:90,align:'left',sortable:true},
        //    {field:'createID',title:'创建人id',type:'int',width:90,hidden:true,align:'left'},
        { field: 'creator', title: '创建人', type: 'string', width: 120, align: 'left' },
        { field: 'createDate', title: '创建时间', type: 'datetime', width: 190, align: 'left', sortable: true },
        //    {field:'id',title:'id',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
        { field: 'modifier', title: '修改人', type: 'string', width: 120, align: 'left' },
        { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 190, align: 'left', sortable: true },
        //    {field:'modifyID',title:'修改人id',type:'int',width:90,hidden:true,align:'left'},
        { field: 'remarks', title: '注意事项/备注', type: 'string', width: 220, align: 'left' },
      ],
      detail: {
        cnName: '#detailCnName',
        columns: [],
        sortName: '',
        key: '',
      },
    }
  },
}
export default vueParam
</script>
